﻿using MySpiderMgr.Domain.Resources.Enums;
using MySpiderMgr.Infrastructure.BaseEntities;
using System;
using System.Collections.Generic;
using System.Text;

namespace MySpiderMgr.Domain.Resources
{
    /// <summary>
    /// 系统资源
    /// </summary>
    public class SysResource : OperatorAndDate<string>
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 上级
        /// </summary>
        public string ParentId { get; set; }
        /// <summary>
        /// 资源类型
        /// </summary>
        public ResourceType ResourceType { get; set; }
        /// <summary>
        /// 操作
        /// </summary>
        public string ActionValues { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public string Url { get; set; }
        /// <summary>
        /// 属性
        /// </summary>
        public string Attrs { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }
        /// <summary>
        /// 父级
        /// </summary>
        public virtual SysResource Parent { get; set; }
        /// <summary>
        /// 子集
        /// </summary>
        public virtual List<SysResource> Children { get; set; }
        /// <summary>
        /// 操作
        /// </summary>
        public List<ActionType> Actions { get; set; }

    }
    /// <summary>
    /// 资源属性
    /// </summary>
    public class ResourceAttr
    {
        /// <summary>
        /// 资源Id
        /// </summary>
        public string ResourceId { get; set; }
        /// <summary>
        /// 属性名称
        /// </summary>
        public string AttrName { get; set; }
        /// <summary>
        /// 属性值
        /// </summary>
        public string AttrValue { get; set; }
    }
}
